import request from '@/router/axios';
//  获取列表接口
export const getJobs=(page,size,params)=>{
    return request({
        url:'/task/task/getJobs',
        method:'post',
        params: {
            ...params,
            page,
            size,
          }
    })
}
// 添加定时任务
export const addJob=(row)=>{
    return request({
        url:'/task/task/addJob',
        method:'post',
        meta: {
            isSerialize: true,
          },
        data:row
    })
}
// 编辑定时任务
export const updataJob=(row)=>{
    return request({
        url:'/task/task/editJob',
        method:'post',
        meta: {
            isSerialize: true,
          },
        data:row
    })
}
// 删除定时任务
export const removeJob=(jobGroup,jobName)=>{
    return request({
        url:'/task/task/delJob',
        method:'post',
        meta: {
            isSerialize: true,
          },
        data:{
            jobGroup,
            jobName
        }
    })
}
// 暂停定时任务
export const pauseJob=(jobGroup,jobName)=>{
    return request({
        url:'/task/task/pauseJob',
        method:'post',
        meta: {
            isSerialize: true,
          },
        data:{
            jobGroup,
            jobName
        }
    })
}
// 恢复定时任务
export const resumeJob=(jobGroup,jobName)=>{
    return request({
        url:'/task/task/resumeJob',
        method:'post',
        meta: {
            isSerialize: true,
          },
        data:{
            jobGroup,
            jobName
        }
    })
}

